import request from "./request"

interface LoginRegisterData  {
    username : string,
    password : string
}

//登录
export const login = (data : LoginRegisterData) => {
    return request({
        url: "/login-api",
        method: "POST",
        data
    })
}

//注册
export const register = (data : LoginRegisterData) => {
    return request({
        url: "/register",
        method: "POST",
        data
    })
}

//获取用户权限
export const getPerms = () => {
    return request({
        url: "/perms",
        method: "GET"
    })
}

